import request from '@/utils/request'
//获取部门列表
export function getDepartmentRequest (data) {
  return request({
    url: '/company/department',
    data
  })
}
//获取-部门负责人列表
export function getUserSimpleRequest () {
  return request.get('/sys/user/simple')
}
//新增-部门
export function addDepartmentRequest (data) {
  return request.post('/company/department', data)
}

//获取-部门详情
export function getDepartmentByIdRequest (id) {
  return request.get(`/company/department/${id}`)
}

//修改-部门详情
export function updateDepartmentByIdRequest (data) {
  return request.put(`/company/department/${data.id}`, data)
}

//删除-部门
export function deleteDepartmentByIdRequest (id) {
  return request.delete(`/company/department/${id}`)
}